package com.skywolf.chem.manager.controller;


import com.skywolf.chem.common.sysconfig.pojo.vo.PageVO;
import com.skywolf.chem.common.sysconfig.response.RespData;
import com.skywolf.chem.riding.pojo.RidingQueryDto;
import com.skywolf.chem.riding.pojo.RidingQueryParam;
import com.skywolf.chem.riding.service.IInfoService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 骑行表 前端控制器
 * </p>
 *
 * @author 
 * @since 2020-09-07
 */
@Slf4j
@RestController
@RequestMapping("/manager/riding/info")
public class RidingManagerController {

    @Autowired
    IInfoService infoService;

    @ApiOperation(value = "骑行记录榜单数据",notes = "骑行记录榜单数据")
    @RequestMapping(value = "/managerRidingList",method = {RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public RespData<RidingQueryDto> managerRidingList(@RequestBody @Validated RidingQueryParam queryParam) {
        PageVO<RidingQueryDto> page = infoService.managerPageList(queryParam);
        return RespData.success(page);
    }

}
